package com.hzncc.flowable_diboot.contract.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;


import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* 字段映射 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-09-04
* Copyright © MyCorp
*/

@TableName("mdl_field_mapping")
@Getter @Setter @Accessors(chain = true)
public class FieldMapping extends BaseModel {
    private static final long serialVersionUID = 1587074074423819950L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 实体类
     */
    @Length(max=100, message="实体类长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String entity;

    /**
     * 备注
     */
    @Length(max=100, message="备注长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remark;

    /**
     * 实体字段
     */
    @Length(max=100, message="实体字段长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String entityField;

    /**
     * 字段路径
     */
    @Length(max=100, message="字段路径长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String fieldPath;

    /**
     * 映射字段
     */
    @Length(max=100, message="映射字段长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String mappingField;

    /**
     * 数据类型
     */
    @TableField()
    private String dataType;

    /**
     * 编码
     */
    @Length(max=100, message="编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String code;

    /**
     * 模板
     */
    @TableField()
    private String template;

    /**
     * 方法
     */
    @Length(max=100, message="方法长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String method;

    /**
     * 版本
     */
    @TableField
    private String version;

}